<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>收银台</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	{include file="public/css"/}
	<style>
		.layui-form-label{width:100px}
		#ggnamediv .layui-input,#ggvaldiv .layui-input{ display:inline;height:30px}
		.disabled{background: #eae9e9}
	</style>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-card layui-col-md12">
			<div class="layui-card-header">
				<i class="fa fa-pencil"></i> 收银台
<!--				<i class="layui-icon layui-icon-close" style="font-size:18px;font-weight:bold;cursor:pointer" onclick="closeself()"></i>-->
			</div>
			<div class="layui-card-body" pad15>
				<div class="layui-form">
					<div class="layui-form-item">
						<label class="layui-form-label"><span class="redstar">*</span>收银台地址：</label>
						<div class="layui-input-inline" style="width:520px;line-height: 45px;">
							<a style="color: #1E9FFF" href="{$cashier_url}" target="_blank">{$cashier_url}</a>
						</div>
						<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">复制收银台地址，并在商户登录的浏览器环境下打开链接</div>
					</div>
					<!--<div class="layui-form-item">
						<label class="layui-form-label">收银员：</label>
						<div class="layui-input-inline" style="width:300px">
							<input type="text" class="layui-input" name="info[option_name]" value="{$info.option_name}" />
						</div>
					</div>-->
					<div class="layui-form-item">
						<label class="layui-form-label">主色调：</label>
						<div class="layui-input-inline">
							<input type="text" name="info[color1]" value="{$info['color1']}" class="layui-input">
						</div>
						<div class="_colorpicker" style="float:left"></div>
						<div class="layui-form-mid layui-word-aux" style="margin-left:10px;">收银台主色调，如：#2792FF</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">抹零位数：</label>
						<div class="layui-input-inline" style="width:300px">
							<input type="text" class="layui-input" name="info[remove_zero_length]" value="{$info.remove_zero_length|default=0}" />
						</div>
						<div class="layui-form-mid layui-word-aux">金额默认为2位小数，长度大于2时，将进行整数位抹零；小于100的金额不支持整数位抹零</div>
					</div>
					<div class="layui-form-item">
						<input type="hidden" name="info[id]" value="{$info.id}">
						<label class="layui-form-label">&nbsp;</label>
						<div class="layui-input-inline">
							<button class="layui-btn" lay-submit lay-filter="formsubmit">保 存</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{include file="public/js"/}
<script>
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		//console.log(field);return;
		var index = layer.load();
		$.post("{:url('save')}",field,function(data){
			layer.close(index);
			dialog(data.msg,data.status);
			if(data.status == 1){
				setTimeout(function(){
					window.location.href="{:url('index')}"
				},1000)
			}
		})
	})
</script>
{include file="public/copyright"/}
</body>
</html>